package com.itqf.ipmsys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.itqf.ipmsys.entity.Role;
import com.itqf.ipmsys.mapper.RoleMapper;
import com.itqf.ipmsys.service.RoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 角色表 服务实现类
 * </p>
 *
 * @author corn
 * @since 2021-09-22
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {

    @Autowired
    private RoleMapper roleMapper;

    /**
     * 根据管理员id查询全部角色
     *
     * @param id
     * @return
     */
    @Override
    public List<Role> findRolesByAdminId(Integer id) {
        return roleMapper.selectRolesByAdminId(id);
    }
}
